package com.lhj.crm.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lhj.crm.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author FYI
 * @since 2020-03-23
 */
@Repository
@Mapper
public interface RoleMapper extends BaseMapper<Role> {

    IPage<Role> selectPageList (Page<Role> rolePage);

    Role selectByName(String roleName);

    Role selectById(Integer roleId);

    Integer addRole(Role role,Integer permId,Integer deptId);

    Integer update(Role role,Integer permId,Integer deptId);
}
